package com.gruuf.done.web;

import com.google.appengine.api.users.UserServiceFactory;
import com.gruuf.done.model.Task;
import com.gruuf.done.repositories.TasksRepository;

import java.util.List;
import java.util.Set;

public class TasksAction extends BaseAction {

    public TasksAction() {
        repository = new TasksRepository();
        userService = UserServiceFactory.getUserService();
    }

    public String execute() {
        return SUCCESS;
    }

    public String types() {
        return SUCCESS;
    }

    public List<Task> getTasks() {
        return repository.readTasks(getUserId());
    }

    public Set<String> getTypes() {
        return repository.readTypes(getUserId());
    }
    
}
